package xyz.chaobei.controller.page;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
@RequestMapping("orgRole")
public class PageOrgRoleController {

    /**
     * 角色管理
     * @return
     */
    @RequestMapping("/view")
    public String toRole() {
        return "system/orgRole";
    }


    /**
     * 角色新增
     *
     * @return
     */
    @GetMapping("add")
    public String toUserAdd() {
        return "system/roleEdit";
    }
    /**
     * 编辑角色
     * @return
     */
    @GetMapping("edit/{id}")
    public String toUserEdit(Map<String, Object> map, @PathVariable("id") Integer id) {
        map.put("id", id);
        return "system/roleEdit";
    }
}
